<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>字符串转JSON</title>
	<script type="text/javascript">
		var str = "{\"class_name\":\"五年级四班\"}";//str.ename
		var json = JSON.parse(str);
		console.log(str);
		console.log(json);
		document.write("班级:" + json.class_name);
	</script>
</head>
<body>

</body>
</html>